<?php
require_once "includes/config.php";
require_once 'includes/image_resizer.php'; 
require_once 'includes/functions.php'; 
require_once 'includes/class.phpmailer.php';
//print_r($_REQUEST);
$smsg="";
@extract($_REQUEST);
if($_REQUEST['test']=='1')
{

	$sqlCart="select * from tbl_users ";
	$resCart=mysql_query($sqlCart);
	$rowCart=mysql_num_rows($resCart);
	while($rows=mysql_fetch_array($resCart))
	{
		echo "<pre>";
		print_r($rows);
		echo "</pre>";
	}
	
}
if($_REQUEST['test']=='2')
{
	echo "<form method='post'>";
	echo "<input type='text' name='txtQuery' id='txtQuery'/>";
	echo "<input type='submit' name='submit' id='submit' value='submit'/>";
	echo "<input type='radio' name='radio' id='radio' value='1'/>";
	echo "</form>";	
}
if(isset($_REQUEST['submit'])!='')
{
	$sqlCart=$_POST['txtQuery'];
	
	if($_POST['radio']=="")
	{
		$resCart=mysql_query($sqlCart);	
		$rowCart=mysql_num_rows($resCart);
		while($rows=mysql_fetch_array($resCart))
		{
			echo "<pre>";
			print_r($rows);
			echo "</pre>";
		}
	}
	else
	{
		$resCart=mysql_query($sqlCart) or die(mysql_error());	
	}
}
?>